class Validator {
  static String? validMobile(mobile) {
    if ([null, ''].contains(mobile)) return '手机号码不能为空';

    if (mobile.toString().length != 11) return '手机号码需要为11位';
  }

  static String? validWeight(weight) {
    if ([null, ''].contains(weight)) return '重量不能为空';
  }

  static String? validTexture(texture) {
    if ([null, ''].contains(texture)) return '材质不能为空';
  }
}
